<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>代理登录</title>
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection">
		<meta name="renderer" content="webkit">
		<link rel="shortcut icon" href="<%=basePath%>favicon.ico">
		<script src="<%=basePath%>js/jquery.min.js?20161104"></script>
		<script type="text/javascript" src="<%=basePath%>js/layer/layer.js?20161126"></script>
		<style type="text/css">
body,div,form,input,img,p {
	margin: 0;
	padding: 0;
}

body {
	font: 14px/ 1.231 Verdana, Arial, Helvetica, sans-serif;
	color: #333333
}

a {
	color: #DD2405;
	text-decoration: underline
}

.bg {
	font-size: 0;
	line-height: 0;
	position: absolute;
	top: 0
}

.bg img {
	width: 1003px;
	border: 0;
}

.opacity {
	background: white;
	filter: alpha(opacity =         50);
	z-index: 1;
	opacity: 0.5;
	width: 364px;
	height: 218px;
}

table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	vertical-align: middle;
	margin-top: 8px;
}

caption {
	height: 39px;
	font-size: 16px;
	color: #C40C00;
	font-weight: bold;
}

caption p {
	position: relative;
	bottom: 2px;
	border-top: 1px solid #FFC84E;
	font-size: 0;
	line-height: 0;
	height: 0
}

caption span {
	padding: 0 10px;
	position: relative;
	z-index: 2;
	background: #FFF9D7;
	top: 10px
}

th,td {
	padding: 8px 0
}

th {
	width: 21%;
	text-align: right;
	padding-left: 4px
}

input {
	height: 30px;
	line-height: 30px;
	border: 1px solid #9B9B9B;
	width: 176px
}

.sbt {
	width: 100%;
	height: 44px;
	padding: 1px;
	text-align: center;
}

.sbt input {
	width: 144px;
	height: 44px;
	color: white;
	background: #c40005;
	font-size: 16px;
	font-weight: bold;
	border: 0;
	cursor: pointer
}

.pwd input {
	width: 180px
}

.vcode input {
	width: 80px
}

.vcode img {
	vertical-align: top;
	height: 32px
}

#shenjiban {
	width: 15px;
	border: none
}

#chuantongban {
	width: 15px;
	border: none
}

#password_container {
	width: 176px;
	display: inline-block;
	height: 30px;
	position: relative;
}

#password_container a {
	line-height: 30px;
	height: 30px;
}

#sec {
	width: auto;
}

.downloadTip {
	display: none;
	background: #d6d6d6;
	color: #333;
	width: 176px;
	height: 22px;
	line-height: 22px;
	text-decoration: none;
	position: absolute;
	left: 0;
	top: 0;
	font-size: 12px;
}

.dtshow {
	display: inline-block;
}

.clx span {
	background: none repeat scroll 0 0 white;
	border: 1px solid #BEA564;
	color: red;
	margin-left: 5px;
	padding: 0 3px;
}

.header {
	width: 100%;
	height: 80px;
	margin: 0 auto;
}

.footer {
	width: 965px;
	background: url("<%=basePath%>images/linebottom.png");
	height: 94px;
	clear: both;
	margin: 0 auto;
}

.corpname {
	color: #A64302;
	font-size: 25px;
	line-height: 80px;
}

.refreshbox {
	position: absolute;
	top: 20px;
	height: 31px;
	line-height: 31px;
	right: 45px;
	font-size: 13px;
	color: #010101;
}

.btn_1 {
	height: 31px;
	line-height: 31px;
	text-align: center;
	cursor: pointer;
}

.main {
	width: 965px;
	margin: 0 auto 20px;
	color: #000;
}

.mainLeft {
	float: left;
	width: 470px;
	height: 368px;
	background: url(<%=basePath%>images/lineLeft.png) right no-repeat;
	position: relative
}

.mainRight {
	float: left;
	width: 450px;
}

.main p {
	margin: 0;
	height: 50px;
	line-height: 50px;
	position: relative;
}

.rightTit {
	position: absolute;
	height: 40px;
	line-height: 40px;
	width: 227px;
	border: 1px solid #878787;
	border-bottom: none;
	border-left: none;
	background-color: #f1f1f1;
	right: 0px;
	bottom: 0px;
}

.h-txt {
	position: absolute;
	height: 50px;
	line-height: 50px;
	color: #cf0002;
	text-align: center;
	width: 220px;
	border: 1px solid #878787;
	border-bottom: none;
	font-size: 18px;
	font-weight: bold;
	background-color: #fff;
}

.datalist-contain {
	overflow: hidden;
}

.datalist {
	width: 398px;
	background: #fff;
	float: left;
	padding: 15px 25px;
	border: 1px solid #878787;
}

.datalist h2 {
	font-size: 14px;
	font-weight: bold;
	margin: 8px 0;
	margin-bottom: 7px;
	color: #333333;
	width: 100%;;
}

.datalist ul {
	overflow: hidden;
	padding-bottom: 8px;
}

.datalist li {
	float: left;
	width: 60px;
	line-height: 25px;
	color: #003399;
	text-align: center;
	margin: 0px 0px 0px 6px;
}

.datalist a:link      ,.datalist a:visited,.datalist a:hover,.datalist a:active
	{
	color: #003399;
}

.datalist li a {
	display: inline-block;
	width: 100%;
	height: 100%;
	color: #003399;
	font-size: 13px;
}

.datalist li span {
	font-size: 12px;
	color: #f00;
}

.dlnotice {
	position: absolute;
	bottom: 0;
	color: #000;
	right: 0px;
	width: 380px;
	padding: 5px;
}

.dlnotice dt {
	margin: 0px;
	line-height: 24px;
	font-size: 14px;
	font-weight: bold;
}

.dlnotice dd {
	margin: 0px;
	line-height: 24px;
	font-size: 13px;
}
.error_info{
	color:#fc4343;
	height: 16px;
    line-height: 14px
}
</style>
	</head>
	<body>
		<div class="header">
		</div>
		<div class='main'>
			<div class="mainLeft">
				<dl class="dlnotice">
					<dt>
						用戶安全須知
					</dt>
					<dd>
						<font color="red">请勿在陌生电脑保存密码登录。</font>
					</dd>
				</dl>
			</div>
			<div class="mainRight">
				<p>
					<span class='h-txt'>代理登录</span><span class="rightTit"></span>
				</p>
				<div class='datalist-contain datalist'>
					<form class="lo login " method="post" id="login_form" action="<%=basePath%>user/login">
		            <table>
		                <tbody>
		                <tr>
		                    <th>账&nbsp;&nbsp;&nbsp;号：</th>
		                    <td>
		                        <input type="text" maxlength="20" name="userNo" tabindex="1">
		                    </td>
		                    <td rowspan="2">
		                    	<input name="loginType" value="2" type="hidden">
		                    </td>
		                </tr>
		                <tr>
		                    <th>密&nbsp;&nbsp;&nbsp;码：</th>
		                    <td>
		                        <input type="password" maxlength="18" name="password" tabindex="2" id="password" style="border: 1px solid rgb(155, 155, 155);">
		                        <span id="password_container" style="display: none;"><span></span></span>
		                    </td>
		                </tr>
		                <tr class="vcode">
		                    <th>验证码：</th>
		                    <td>
		                        <input type="text" autocomplete="off" maxlength="4" name="captcha" value="" tabindex="3">
		                        <span id="img">
		                        <img id="login-form-captcha" class="login-form-captcha" src="<%=basePath%>user/verified" alt="验证码" onclick="this.src='<%=basePath%>user/verified?'+Math.random()"/>
		                        </span>
		                    </td>
		                    <td><a href="javascript:void(0)" onclick="changeCode();">看不清？</a>
		                    </td>
		                </tr>
		                <tr>
		                    <td colspan="2">
		                    <div class="sbt">
		                            <input type="button" value="登录" name="submit" onclick="login();" tabindex="4">
		                        </div></td>
		                </tr>
		            </tbody>
		            </table>
        		</form>
				</div>
			</div>
		</div>
		<div class="footer"></div>
	</body>
	<script type="text/javascript">
		function changeCode(){
			document.getElementById("login-form-captcha").src = "<%=basePath%>user/verified?t=" + Math.random().toString();
		}
		function login(){
			var userName = $("input[name=userNo]").val();
			var password = $("input[name=password]").val();
			var captcha = $("input[name=captcha]").val();
			if($.trim(userName) == ''){
				layer.msg("帐号不能为空！");
				return;
			}
			if($.trim(password) == ''){
				layer.msg("密码不能为空！");
				return;
			}
			if($.trim(captcha) == ''){
				layer.msg("验证码不能为空！");
				return;
			}
			$.ajax({
	            type: "POST",
	            url:$("form").attr("action"),
	            data:$("form").serialize(),
	            error: function(request) {
	                alert("Connection error");
	            },
	            success: function(data) {
	            	if(data.resultCode == '0'){
	            		window.location.href = "<%=basePath%>manage/index";
	            	}else{
	            		layer.msg(data.msg);
	            	}
	            }
	        });
		}
	</script>
</html>